<admintpl file="header" />
<!-- Bootstrap -->
<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
<link href="__PUBLIC__/js/jquery-ui/jquery-ui.min.css" rel="stylesheet" />

<style type="text/css">
	.table td {
		border: 1px solid #ddd !important;
	}
</style>
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('ConstructionWeeklyReport/index')}">周工作计划管理</a></li>
			<li ><a href="{:U('ConstructionWeeklyReport/plan_add')}">新增工作计划</a></li>
			<li class="active"><a href="{:U('ConstructionWeeklyReport/plan_add')}">编辑工作计划</a></li>
		</ul>
		<section class="tab-pane active fade in" id="access">

			<div class="row">
				<div class="col-xs-12 col-md-12 col-lg-12">
					<div class="panel panel-info">

						<div class="panel-body">
							<form class="js-ajax-form form-horizontal form-inline tg" action="{:U('ConstructionWeeklyReport/plan_edit_post')}" method="post">
								<div class="header text-center">
									<h2>下周工作计划安排</h2>
									<hr />
								</div>
								<input type="hidden" name="id" value="{$data.id}" />

								<div class="form-group" style="margin-left: 10px">
									<label for="exampleInputName2">开始时间</label>
									<input type="text" name="being_date" id="from" required class="input-xt input-name"   value="{$data.being_date}"/>
								</div>
								<div class="form-group" style="margin-left: 15px">
									<label for="exampleInputEmail2">结束时间</label>
									<input type="text" name="end_date" id="to" required class="input-xt input-name" value="{$data.end_date}"/>
								</div>

								<table class="table table-bordered table-condensed">
									<thead>
										<tr>
											<th colspan="2">日期</th>
											<th>主要工作</th>
										</tr>
									</thead>
									<tbody>
										<tr class="odd-color">
											<td rowspan="2" class="td-center">
												<h3 class="text-success">周一</h3>
											</td>
											<td class="td-center ">上午</td>
											<td>
												<textarea class="input planarea" name="monday_am">{$data.monday_am}</textarea>
											</td>
										</tr>
										<tr class="odd-color">

											<td class="td-center">下午</td>
											<td><textarea class="input planarea" name="monday_pm">{$data.monday_pm}</textarea></td>
										</tr>
										<tr>
											<td rowspan="2" class="td-center">
												<h3 class="text-success">周二</h3>
											</td>
											<td class="td-center">上午</td>
											<td><textarea class="input planarea" name="tuesday_am">{$data.tuesday_am}</textarea></td>
										</tr>
										<tr>

											<td class="td-center">下午</td>
											<td><textarea class="input planarea" name="tuesday_pm">{$data.tuesday_pm}</textarea></td>
										</tr>
										<tr class="odd-color">
											<td rowspan="2" class="td-center">
												<h3 class="text-success">周三</h3>
											</td>
											<td class="td-center">上午</td>
											<td><textarea class="input planarea" name="wednesday_am">{$data.wednesday_am}</textarea></td>
										</tr>
										<tr class="odd-color">

											<td class="td-center">下午</td>
											<td><textarea class="input planarea" name="wednesday_pm">{$data.wednesday_pm}</textarea></td>
										</tr>
										<tr>
											<td rowspan="2" class="td-center">
												<h3 class="text-success">周四</h3>
											</td>
											<td class="td-center">上午</td>
											<td><textarea class="input planarea" name="thursday_am">{$data.thursday_am}</textarea></td>
										</tr>
										<tr>

											<td class="td-center">下午</td>
											<td><textarea class="input planarea" name="thursday_pm">{$data.thursday_pm}</textarea></td>
										</tr>
										<tr class="odd-color">
											<td rowspan="2" class="td-center">
												<h3 class="text-success">周五</h3>
											</td>
											<td class="td-center">上午</td>
											<td><textarea class="input planarea" name="friday_am">{$data.friday_am}</textarea></td>
										</tr>
										<tr class="odd-color">

											<td class="td-center">下午</td>
											<td><textarea class="input planarea" name="friday_am">{$data.friday_am}</textarea></td>
										</tr>
										<tr>
											<td rowspan="2" class="td-center text-danger">
												<h4>周六</h4>
											</td>
											<td class="td-center">上午</td>
											<td><textarea class="input planarea offday" name="saturday_am">{$data.saturday_am}</textarea></td>
										</tr>
										<tr>

											<td class="td-center">下午</td>
											<td><textarea class="input planarea offday" name="saturday_pm">{$data.saturday_pm}</textarea></td>
										</tr>
										<tr>
											<td rowspan="2" class="td-center text-danger">
												<h4>周日</h4>
											</td>
											<td class="td-center">上午</td>
											<td><textarea class="input planarea offday" name="sunday_am">{$data.sunday_am}</textarea></td>
										</tr>
										<tr>

											<td class="td-center">下午</td>
											<td><textarea class="input planarea offday" name="sunday_pm">{$data.sunday_pm}</textarea></td>
										</tr>
										<tr>

											<td class="td-center">备注</td>
											<td colspan="2"><textarea class="input planarea" name="remark" >{$data.remark}</textarea></td>
											<input type="hidden" name="record_type" value="1" />
										</tr>
									</tbody>
								</table>
								<div class="form-actions">
									<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
									<if condition="$Role == 3 || $Role == 0">
										<a class="btn btn-warning" href="{:U('ConstructionWeeklyReport/publish', array('id'=>I('request.id/s',''), 'fun' => 'index'))}">发布</a>
									</if>
									<a class="btn btn-default" href="javascript:history.back(-1);">{:L('BACK')}</a>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</section>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-ui/jquery-ui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-ui/datepicker-zh-CN.js"></script>
	<script type="text/javascript">
		$(function () {
			$("#from").datepicker({
				dateFormat: "yy-mm-dd",
				defaultDate: "+1w",
				changeMonth: true,
				showWeek: true,
				numberOfMonths: 1,
				maxDate: '#F{$dp.$D(\'to\')}',
				onClose: function (selectedDate) {
					$("#to").datepicker("option", "minDate", selectedDate);
				}
			});
			$("#to").datepicker({
				defaultDate: "+1w",
				changeMonth: true,
				showWeek: true,
				numberOfMonths: 1,
				minDate:'#F{$dp.$D(\'from\')}',
				onClose: function (selectedDate) {
					$("#from").datepicker("option", "maxDate", selectedDate);
				}
			});
		})
	</script>
</body>
</html>
